using CatLib.Container;

namespace GameFramework.Gameplay
{
    /// <summary>
    /// 玩法模型容器实现
    /// </summary>
    internal sealed class GameplayModelContainer : IGameplayModelContainer
    {
        private const string Tag = "GameplayModel";

        public void Initialize()
        {
            CatLib.App.That.Tagged(Tag);
        }

        public void Dispose()
        {
            CatLib.App.That.UnbindTag(Tag);
        }

        public void Add<T>() where T : class, IGameplayModel
        {
            CatLib.App.That.Singleton<T>().Tag(Tag);
        }
    }
}